package com.cqw.commontest;

import com.cqw.jackson.IdDeserializer;
import com.cqw.jackson.IdSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.io.Serializable;

/**
 * @Author: caoqingwen
 * @CreateTime: 2021-08-25 15:32
 * @Description: 测试自定义序列化与反序列化
 */
@Data
public class JacksonUser implements Serializable {

    private static final long serialVersionUID = 722268688804194294L;
    @JsonSerialize(using = IdSerializer.class)
    @JsonDeserialize(using = IdDeserializer.class)
    private Long userId;

    private String userName;

    private Long age;
}
